home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / uhren & terminkalender / time / sunclock / source / sunmath.h < prev    next >
Text File  |  1996-04-07  |  673b  |  24 lines

  1.  
  2. #define PI 3.14159265358979323846
  3.  
  4. /* Extract sign */
  5. #define sgn(x) (((x) < 0) ? -1 : ((x) > 0 ? 1 : 0))
  6. /* Degree->Radian */
  7. #define dtr(x) ((x) * (PI / 180.0))
  8. /* Radian->Degree */
  9. #define rtd(x) ((x) / (PI / 180.0))
  10. /* Fix angle      */
  11. #define fixangle(a) ((a) - 360.0 * (floor((a) / 360.0)))
  12.  
  13. #define TERMINC  100           /* Circle segments for terminator */
  14.  
  15. #define PROJINT  (60 * 10)       /* Frequency of seasonal recalculation
  16.                       in seconds. */
  17.  
  18. /* astro.c */
  19. long jdate(struct tm *t);
  20. double jtime(struct tm *t);
  21. double kepler(double m, double ecc);
  22. int sunpos(double jd, int apparent, double *ra, double *dec, double *rv, double *slong);
  23. double gmst(double jd);
  24.